package TAIC.Classifier;

import TAIC.text.Dict;
import TAIC.text.TextBayes;

public abstract class Classifier {
	abstract public void train ( String trainFile );
	abstract public double test ( String testFile );
	
	protected int translateClass ( String str ) {
		if ( str.charAt( 0 ) == '-' ) return 0 ;
		else if ( str.charAt( 0 ) == '+' ) return 1;
		else return Integer.valueOf( str ) ;
	}
//	public void setPipeMode () { pipe = true ; } ;
//	public void setFileMode () { pipe = false ; } ; 
	
	public static ClassifierConfigure cConfig= new ClassifierConfigure ( "classifier.txt" ) ;
	public static ClassifierFactory cFact= new ClassifierFactory () ;
	public void addInAuxilary ( TextBayes model , Dict dict , double lambda )  {}
	
	public boolean isPipe() {
		return true ; 
	}
//	public boolean pipe = true ;
	public byte trainPipe [];
	public byte testPipe [];
	public double lambda = 1 ;
	
}
